import java.util.Scanner;

public class text {
    public static void main(String[] args) {
        text01();
        System.out.println("=========================");
        text02();
        System.out.println("=========================");
        text03();
        System.out.println("=========================");
        text04();
        System.out.println("=========================");
        text05();
        System.out.println("=========================");
        text06();
        System.out.println("=========================");
        text07();
        System.out.println("=========================");
        text08();
        System.out.println("=========================");
        text09();
        System.out.println("=========================");
        text10();
        System.out.println("=========================");
        text11();
    }

    public static void text01() {
        System.out.println("利润为：");
        Scanner sc = new Scanner(System.in);
        double a = sc.nextInt();
        double b;
        if(a <= 100000) {
            b = a * 0.1;
            System.out.println("奖金为：" +b);
        }
        else if(a > 100000 && a <= 200000){
            b = 10000 + (a - 100000) * 0.075;
            System.out.println("奖金为：" +b);
        }
        else if(a > 200000 && a <= 400000) {
            b = 17500 + (a - 200000) * 0.05;
            System.out.println("奖金为：" +b);
        }
        else if(a > 400000 && a <= 600000) {
            b = 27500 + (a - 400000) * 0.03;
            System.out.println("奖金为：" +b);
        }
        else if(a > 60000 && a <= 1000000) {
            b = 33500 + (a - 600000) * 0.015;
            System.out.println("奖金为：" +b);
        }
        else if(a > 1000000) {
            b = 39500 + (a - 1000000) * 0.01;
            System.out.println("奖金为：" +b);
        }

    }

    public static void text02() {
        System.out.print("分数为：");
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        double b = a / 10.0;
        switch(a / 10){
            case 9:
                System.out.println("A");
                break;
            case 8:
                System.out.println("B");
                break;
            case 7:
                System.out.println("C");
                break;
            case 6:
                System.out.println("D");
                break;
            default:
                System.out.println("E");
                break;
        }

    }

    public static void text03() {
        double a = 30000;
        double sum = 30000;
        for(int i = 2; i<11; i++){
            a = a * 0.06 + a;
            sum = sum + a;
        }
        System.out.println("十年后的年薪为：" +a);
        System.out.println("十年的总收入为：" +sum);

    }

    public static void text04(){
        int i = 1;
        int sum = 1;
        while(i < 10){
            sum = (sum + 1) * 2;
            i++;
        }
        System.out.println("第一天采了多少个桃子：" +sum);
    }

    public static void text05(){
        System.out.print("输入一个数字");
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        switch(a % 2){
            case 1:
                System.out.println("这个数是奇数");
                break;
            case 0:
                System.out.println("这个数是偶数");
                break;
        }
    }

    public static void text06(){
        System.out.print("输入一个数字");
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        switch(a){
            case 1:
                System.out.println("1");
                break;
            case 5:
                System.out.println("5");
                break;
            case 10:
                System.out.println("10");
                break;
            default:
                System.out.println("none");
                break;
        }
    }

    public static void text07(){
        System.out.print("输入一个数字");
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        if(a % 5 == 0 && a % 6 == 0){
            System.out.println("能被5和6整除");
        }
        else if(a % 5 == 0 && a % 6 != 0){
            System.out.println("能被5整除");
        }
        else if(a % 5 != 0 && a % 6 == 0){
            System.out.println("能被6整除");
        }
        else{
            System.out.println("不能被5或6整除");
        }
    }

    public static void text08(){
        System.out.print("输入年份：");
        Scanner sc = new Scanner(System.in);
        double a = sc.nextInt();
        double b = a % 4;
        if(b != 0){
            System.out.println("今年不是闰年");
        }
        else {
            System.out.println("今年是闰年");
        }
    }


    public static void text09(){
        System.out.print("输入分数：");
        Scanner sc = new Scanner(System.in);
        double a = sc.nextInt();
        if(a <= 100 && a >= 90){
            System.out.println("分数等级为A");
        }
        else if(a < 90 && a >= 80){
            System.out.println("分数等级为B");
        }
        else if(a < 80 && a >= 70){
            System.out.println("分数等级为C");
        }
        else if(a < 70 && a >= 60){
            System.out.println("分数等级为D");
        }
        else if(a < 60){
            System.out.println("分数等级为E");
        }
        else if(a > 100 && a < 0){
            System.out.println("分数无效");
        }
    }

    public static void text10(){
        System.out.println("输入三个数字：");
        Scanner sc = new Scanner(System.in);
        double a = sc.nextInt();
        double b = sc.nextInt();
        double c = sc.nextInt();
        if(a > b){
            double d = a;
            a = b;
            b = d;
        }
        if(a > c){
            double d = c;
            c = a;
            a = d;
        }
        if(b > c){
            double d = c;
            c = b;
            b = d;
        }
        System.out.println("这三个数由小到大排列为："+a+" < "+b+" < "+c+" ");
    }

    public static void text11(){
        System.out.println("输入一个数字：");
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int length = 0;
        int [] strArry = new int[5];
        int i = 0;
        while(a % 10 != 0){
            length++;
            strArry[i] = a % 10;
            i++;
            a = a / 10;
        }
        System.out.println(+length);
        for (int j = length-1; j>=0; j--) {
            System.out.print(strArry[j]);
            System.out.print(",");
        }

    }
}
